<template>
  <div class="app-container">
    <div class="tr" style="margin-bottom: 10px;">
      <el-button-group>
        <el-button :type="view==='redisMonitor'?'primary':''" @click="changeView('redisMonitor')">监控模式</el-button>
        <el-button :type="view==='redisManager'?'primary':''" @click="changeView('redisManager')">管理模式</el-button>
      </el-button-group>
    </div>
    <component :is="view" />
  </div>
</template>
<script>
import redisManager from './redisManager.vue'
import redisMonitor from './redisMonitor.vue'
export default {
  components: { redisManager, redisMonitor },
  data() {
    return {
      view: 'redisMonitor'
    }
  },
  methods: {
    changeView(view) {
      this.view = view
    }
  }
}
</script>
